---
title: Async Agent with Tools
---

## Code

```python cookbook/models/nexus/async_tool_use.py
"""
Async example using Nexus with tool calls
"""

import asyncio

from agno.agent import Agent
from agno.models.nexus import Nexus
from agno.tools.duckduckgo import DuckDuckGoTools

agent = Agent(
    model=Nexus(id="anthropic/claude-sonnet-4-20250514"),
    tools=[DuckDuckGoTools()],
    markdown=True,
)

asyncio.run(agent.aprint_response("Whats happening in France?"))

```

## Usage

<Steps>
  <Snippet file="create-venv-step.mdx" />

<Step title="Set your API keys">
```bash 
export ANTHROPIC_API_KEY=xxx 
```
</Step>

<Step title="Install libraries">
  ```bash 
  pip install -U agno ddgs openai 
  ```
</Step>

  <Step title="Run Agent">
    <CodeGroup>
    ```bash Mac
    python cookbook/models/nexus/async_tool_use.py
    ```

    ```bash Windows
    python cookbook/models/nexus/async_tool_use.py
    ```
    </CodeGroup>

  </Step>
</Steps>